import 'package:flutter/material.dart';

class SecondPage extends StatefulWidget {
  final String? title;

  const SecondPage({super.key, required this.title});

  @override
  State<SecondPage> createState() => _SecondPageState();
}

class _SecondPageState extends State<SecondPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title ?? 'Second')),
      body: Center(
        child: TextButton(
          onPressed: () {
            Navigator.pop(context);
            // GoRouter.of(context).canPop();
          },
          child: Text("返回", style: TextStyle(fontSize: 20)),
        ),
      ),
    );
  }
}
